from django.db import models

# Create your models here.

#员工表
class Staff(models.Model):
    username=models.CharField(max_length=32,unique=True)
    password=models.CharField(max_length=255)
    cate=models.ForeignKey('Department',on_delete=models.CASCADE)

    class Meta:
        db_table='staff'




#部门表
class Department(models.Model):
    name=models.CharField(max_length=32)
    status=models.BooleanField(default=False)
    addtime=models.DateTimeField(auto_now_add=True)

    class Meta:
        db_table='department'

